#ifndef _UTILITY_H_
#define _UTILITY_H_

#include <string>
#include <stdint.h>

class XUtility
{
public:
	static std::string str_2_hex(const char* value, int value_len);
	static std::string str_2_hex(const std::string& value);
	static std::string hex_2_str(const std::string& value);
	static std::string uint64_2_string(uint64_t v);
	static std::string uint32_2_string(uint32_t v);
	static std::string int32_2_string(int32_t v);
	static std::string time_2_string(time_t time, const char* format = "%Y-%m-%d %H:%M:%S");
	static std::string time_2_string(uint64_t time, const char* format = "%Y-%m-%d %H:%M:%S");
};

#endif

